package main.java.peopleinfo;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import lombok.Getter;
import lombok.Setter;
import org.apache.hadoop.io.Writable;

@Getter
@Setter
public class PeopleInfo implements Writable{

//	@Override
//	public void readFields(DataInput input) throws IOException {
//		this.peopleID = input.readInt();
//		this.gender = input.readUTF();
//		this.height = input.readInt();
//	}
//
//	@Override
//	public void write(DataOutput output) throws IOException {
//		output.writeInt(this.peopleID);
//		output.writeUTF(this.gender);
//		output.writeInt(this.height);
//	}


    private int peopleID;
    private String gender;
    private int height;

    @Override
    public void write(DataOutput dataOutput) throws IOException {
        dataOutput.writeInt(this.peopleID);
        dataOutput.writeUTF(this.gender);
        dataOutput.writeInt(this.height);
    }

    @Override
    public void readFields(DataInput dataInput) throws IOException {
        this.peopleID=dataInput.readInt();
        this.gender=dataInput.readUTF();
        this.height=dataInput.readInt();

    }


}
